package com.easychat.entity;

import com.easychat.utils.StringTools;

import java.util.Date;
import java.io.Serializable;

/**
 * (AppUpdate)实体类
 *
 * @author makejava
 * @since 2024-10-14 16:39:33
 */
public class AppUpdate implements Serializable {
    private static final long serialVersionUID = 586628568786995967L;
/**
     * 自增id
     */
    private Integer id;
/**
     * 版本号
     */
    private String version;
/**
     * 更新描述
     */
    private String updateDesc;
/**
     * 创建时间
     */
    private Date createTime;
/**
     * 0:未发布 1:灰度发布 2:全网发布
     */
    private Integer status;
/**
     * 灰度uid
     */
    private String grayscaleUid;
/**
     * 文件类型 0:本地文件 1:外链
     */
    private Integer fileType;
/**
     * 外链地址
     */
    private String outerLink;
    private String[] updateDescArray;

    public String[] getUpdateDescArray() {
        if(!StringTools.isEmpty(updateDesc)){
            return updateDesc.split("\\|");
        }
        return updateDescArray;
    }

    public void setUpdateDescArray(String[] updateDescArray) {
        this.updateDescArray = updateDescArray;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getUpdateDesc() {
        return updateDesc;
    }

    public void setUpdateDesc(String updateDesc) {
        this.updateDesc = updateDesc;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getGrayscaleUid() {
        return grayscaleUid;
    }

    public void setGrayscaleUid(String grayscaleUid) {
        this.grayscaleUid = grayscaleUid;
    }

    public Integer getFileType() {
        return fileType;
    }

    public void setFileType(Integer fileType) {
        this.fileType = fileType;
    }

    public String getOuterLink() {
        return outerLink;
    }

    public void setOuterLink(String outerLink) {
        this.outerLink = outerLink;
    }

}

